﻿using System;

namespace DART.Detector.IRay
{
    /// <summary>
    /// 探测器事件参数 
    /// </summary>
    public class DetectorEventArgs : EventArgs
    {
        public DetectorEventArgs(IDetectorStatus status, IDetectorCounter counter, IGrayImage image, Exception exception, EventArgs deviceArgs)
        {
            DeviceArgs = deviceArgs;
            Image = image;
            DetectorStatus = status;
            DetectorCounter = counter;
            Exception = exception;
        }

        /// <summary>
        /// 探测器状态信息，探测器采集图像和序列结束事件有效，其它情况为 <see langword="null"/> 。
        /// </summary>
        public IDetectorStatus DetectorStatus { get; }

        /// <summary>
        /// 探测器图像计数信息，探测器采集图像和序列结束事件有效，其它情况为 <see langword="null"/> 。
        /// </summary>
        public IDetectorCounter DetectorCounter { get; }

        /// <summary>
        /// 图像，探测器采集图像事件有效，其它情况为 <see langword="null"/>
        /// </summary>
        public IGrayImage Image { get; }

        /// <summary>
        /// 异常，无异常为 <see langword="null"/>
        /// </summary>
        public Exception Exception { get; }

        /// <summary>
        /// 探测器底层回调参数，探测器事件有效，非探测器事件为 <see langword="null"/> 。
        /// </summary>
        public EventArgs DeviceArgs { get; }
    }
}